<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>故障报告管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            //$("#name").focus();
            $("#inputForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
    </script>
</head>
<body>
<!--
<ul class="nav nav-tabs">
    <li><a href="${ctx}/elmt/failureReport/">故障报告列表</a></li>
    <li class="active"><a href="${ctx}/elmt/failureReport/form?formId=${failureReport.formId}">故障详情</a></li>
    <li><a href="${ctx}/elmt/failureSurveyContent/?failureNo=${failureReport.failureNo}&remark=${failureReport.formId}">调查内容</a></li>
    <li><a href="${ctx}/elmt/failureReplacementPart/?failureNo=${failureReport.failureNo}&remark=${failureReport.formId}">配件更换</a></li>
</ul>
<br/>
-->
<form:form id="inputForm" modelAttribute="failureReport" action="${ctx}/elmt/failureReport/save" method="post" class="form-horizontal">
<form:hidden path="formId"/>
<sys:message content="${message}"/>
<div class="container-fluid">
    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">故障报告单编号：</label>

                <div class="col-xs-8">
                    <form:input path="failureNo" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge required"/>
                    <span class="help-inline"><font color="red">*</font> </span>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">维保单位代码：</label>

                <div class="col-xs-8">
                    <form:input path="maintenUnitCode" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>
    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">维保人员：</label>

                <div class="col-xs-8">
                    <form:input path="maintenanceStaff1Name" htmlEscape="false" maxlength="20" class="form-control input-sm input-mini "/>
                    <form:input path="maintenanceStaff2Name" htmlEscape="false" maxlength="20" class="form-control input-sm input-mini "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">安全管理人员：</label>

                <div class="col-xs-8">
                    <form:input path="safetyOfficer" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">使用单位代码：</label>

                <div class="col-xs-8">
                    <form:input path="useUnitCode" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">单位内部编号：</label>

                <div class="col-xs-8">
                    <form:input path="internalCode" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">设备注册代码：</label>

                <div class="col-xs-8">
                    <form:input path="deviceCode" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge required"/>
                    <span class="help-inline"><font color="red">*</font> </span>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">设备所在区域：</label>

                <div class="col-xs-8">
                    <form:input path="deviceArea" htmlEscape="false" maxlength="10" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">设备所在地点：</label>

                <div class="col-xs-8">
                    <form:input path="deviceAddr" htmlEscape="false" maxlength="100" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">故障报告时间：</label>

                <div class="col-xs-8">
                    <input name="reportTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
                           value="<fmt:formatDate value="${failureReport.reportTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">到达时间：</label>

                <div class="col-xs-8">
                    <input name="arrivalTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
                           value="<fmt:formatDate value="${failureReport.arrivalTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">完成时间：</label>

                <div class="col-xs-8">
                    <input name="completionTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
                           value="<fmt:formatDate value="${failureReport.completionTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-12">
            <div class="form-group">
                <label class="control-label col-xs-2">故障状态：</label>

                <div class="col-xs-10">
                    <form:checkboxes path="failureStatusList" items="${allFailureStatus}" itemLabel="label" itemValue="value" htmlEscape="false" disabled="true"/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">故障状态补充说明：</label>

                <div class="col-xs-8">
                    <form:input path="failureStatusRemark" htmlEscape="false" maxlength="200" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">是否困人：</label>

                <div class="col-xs-8">
                    <form:select path="trappedPeople" class="form-control input-sm input-xlarge ">
                        <form:option value="" label=""/>
                        <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                    </form:select>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">困人时间（分钟）：</label>

                <div class="col-xs-8">
                    <form:input path="trappedTime" htmlEscape="false" maxlength="10" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">脱困情况：</label>

                <div class="col-xs-8">
                    <form:select path="outDifficulty" class="form-control input-sm input-xlarge ">
                        <form:option value="" label=""/>
                        <form:options items="${fns:getDictList('OUT_DIFFICULTY')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                    </form:select>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">被困人数：</label>

                <div class="col-xs-8">
                    <form:input path="trappedNumber" htmlEscape="false" maxlength="10" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">故障报告内容：</label>

                <div class="col-xs-8">
                    <form:textarea path="failureReportContent" cssStyle="width: 50%;" htmlEscape="false" maxlength="500" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">故障实际情况：</label>

                <div class="col-xs-8">
                    <form:textarea path="actualFaultCondition" cssStyle="width: 50%;" htmlEscape="false" maxlength="500" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="form-group">
                <label class="control-label col-xs-4">故障原因：</label>

                <div class="col-xs-8">
                    <form:textarea path="failureReason" cssStyle="width: 50%;" htmlEscape="false" maxlength="500" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>

    <div class="row" style="padding-top:5px">
        <div class="col-xs-12">
            <div class="form-group">
                <label class="control-label col-xs-2">处理状态：</label>

                <div class="col-xs-10">
                    <form:checkboxes path="processStatusList" items="${allFailurePrecessStatus}" itemLabel="label" itemValue="value" htmlEscape="false" disabled="true"/>
                </div>
            </div>
        </div>
    </div>
    <div class="row" style="padding-top:5px">
        <div class="col-xs-12">
            <div class="form-group">
                <label class="control-label col-xs-2">处理状态补充说明：</label>

                <div class="col-xs-10">
                    <form:textarea path="processStatusRemark" cssStyle="width: 50%;" htmlEscape="false" maxlength="500" class="form-control input-sm input-xlarge "/>
                </div>
            </div>
        </div>
    </div>

    <div class="form-actions" style="text-align: center">
        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
    </div>
    </form:form>
</body>
</html>